package com.stox.core.ui.swing.wrapper;

import java.awt.Dimension;
import java.util.Vector;

import javax.swing.ListSelectionModel;
import javax.swing.table.TableColumnModel;
import javax.swing.table.TableModel;

import org.jdesktop.swingx.JXTable;

import com.stox.core.ui.swing.util.SwingUtil;

public class JTable extends JXTable {
	private static final long serialVersionUID = -3067199296978668019L;

	public void init(){
		SwingUtil.initializeWidget(this);
	}
	
	public JTable() {
		super();
		init();
	}

	@Override
	public Dimension getPreferredScrollableViewportSize() {
		return super.getPreferredScrollableViewportSize();
	}
	
	public JTable(int numRows, int numColumns) {
		super(numRows, numColumns);
		init();
	}

	public JTable(Object[][] rowData, Object[] columnNames) {
		super(rowData, columnNames);
		init();
	}

	public JTable(TableModel dm, TableColumnModel cm, ListSelectionModel sm) {
		super(dm, cm, sm);
		init();
	}

	public JTable(TableModel dm, TableColumnModel cm) {
		super(dm, cm);
		init();
	}

	public JTable(TableModel dm) {
		super(dm);
		init();
	}

	public JTable(Vector<?> rowData, Vector<?> columnNames) {
		super(rowData, columnNames);
		init();
	}
	
	public Class<?> getColumnClass(int column){
        return getValueAt(0, column).getClass();
    }

}
